# Maintainer: Alexey Pavlov <alexpux@gmail.com>

_realname=Class-Method-Modifiers
pkgname=perl-${_realname}
pkgver=2.12
pkgrel=1
pkgdesc="provides Moose-like method modifiers"
arch=('any')
url="https://search.cpan.org/dist/Class-Method-Modifiers"
groups=('perl-modules')
depends=('perl-Test-Fatal' 'perl-Test-Requires')
license=('GPL' 'PerlArtistic')
source=("https://cpan.metacpan.org/authors/id/E/ET/ETHER/Class-Method-Modifiers-${pkgver}.tar.gz")
sha256sums=('e44c1073020bf55b8c97975ed77235fd7e2a6a56f29b5c702301721184e27ac8')

prepare() {
  cd "${srcdir}/${_realname}-${pkgver}"
}

build() {
  cd "${srcdir}/${_realname}-${pkgver}"
  PERL_MM_USE_DEFAULT=1 \
  PERL_AUTOINSTALL=--skipdeps \
  PERL5LIB="" \
  MODULEBUILDRC=/dev/null \
  PERL_MM_OPT="INSTALLDIRS=vendor" \
  PERL_MB_OPT="--installdirs vendor" \
  perl Makefile.PL INSTALLDIRS=vendor
  make
}

package() {
  cd "${srcdir}/${_realname}-${pkgver}"
  make install DESTDIR="${pkgdir}"
}
